package com.burstly.lib.component.networkcomponent.burstly;

import android.content.Context;
import android.content.pm.PackageManager.NameNotFoundException;
import com.burstly.lib.component.IBurstlyAdaptor;
import com.burstly.lib.component.networkcomponent.AbstractAdaptorFactory;
import com.burstly.lib.component.networkcomponent.burstly.html.BurstlyScriptAdaptor;
import com.burstly.lib.component.networkcomponent.burstly.video.BurstlyVideoAdaptor;
import com.burstly.lib.util.ManifestValidator;
import com.burstly.lib.util.ManifestValidator.ValidationResults;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

public class BurstlyAdaptorFactory extends AbstractAdaptorFactory
{
  private static final String ADAPTOR_NAME = "adaptorName";
  private static final List<String> BURSTLY_MANDATORY_ACTIVITIES = Arrays.asList(new String[] { "com.burstly.lib.component.networkcomponent.burstly.BurstlyFullscreenActivity" });
  private static final List<String> BURSTLY_MANDATORY_PERMISSIONS = Arrays.asList(new String[] { "android.permission.INTERNET", "android.permission.WRITE_EXTERNAL_STORAGE" });
  private static final List<String> BURSTLY_OPTIONAL_PERMISSIONS = Arrays.asList(new String[] { "android.permission.READ_PHONE_STATE", "android.permission.ACCESS_WIFI_STATE" });
  private static final String FULL_CLASS_NAME = "com.burstly.lib.component.networkcomponent.burstly.BurstlyAdaptorFactory";
  private static final String NETWORK_NAME = "burstly";

  public BurstlyAdaptorFactory()
  {
    super("com.burstly.lib.component.networkcomponent.burstly.BurstlyAdaptorFactory", "BurstlyAdaptorFactory");
  }

  public IBurstlyAdaptor createAdaptor(Map<String, ?> paramMap)
  {
    String str = (String)paramMap.get("adaptorName");
    Object localObject1 = paramMap.get("viewId");
    Object localObject2 = paramMap.get("context");
    if (str != null)
    {
      if (str.equals("BURSTLY_IMAGE"))
        return new BurstlyImageAdaptor((Context)localObject2, (String)localObject1);
      if (str.equals("BURSTLY_TEXT"))
        return new BurstlyTextAdaptor((Context)localObject2, (String)localObject1);
      if (str.equals("BURSTLY_SCRIPT"))
        return new BurstlyScriptAdaptor((Context)localObject2, (String)localObject1);
      if (str.equals("BURSTLY_VIDEO"))
        return new BurstlyVideoAdaptor((Context)localObject2, (String)localObject1);
    }
    return null;
  }

  protected IBurstlyAdaptor createInstance(Context paramContext, String paramString)
  {
    return null;
  }

  public ManifestValidator.ValidationResults validateManifest()
    throws PackageManager.NameNotFoundException
  {
    ManifestValidator.ValidationResults localValidationResults = ManifestValidator.customValidate(BURSTLY_MANDATORY_ACTIVITIES, BURSTLY_MANDATORY_PERMISSIONS, BURSTLY_OPTIONAL_PERMISSIONS);
    localValidationResults.setNetworkName("burstly");
    return localValidationResults;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.component.networkcomponent.burstly.BurstlyAdaptorFactory
 * JD-Core Version:    0.6.2
 */